export class State {
    constructor() {
        this._state = [];
    }

    empty() {
        return this._state.length === 0;
    }

    push(obj) {
        this._state.push(obj);
    }

    pop() {
        this._state.pop();
    }

    top() {
        return this._state[this._state.length - 1];
    }
}
